//package com.example.magicapi.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import java.util.Arrays;
//
////使用WebMvcConfigurer可以来扩展SpringMvc的功能
//@Configuration
//public class WebMvcConfig implements WebMvcConfigurer {
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new LoginHandlerInterceptor())
//                .addPathPatterns("/**").excludePathPatterns(Arrays.asList(
//                        "/", "/login.html", "/user/login", "/asserts/**",
//                        "/webjars/**"));
//    }
//
//    ;
//};